package com.bshark.biz;

import java.util.List;

import com.bshark.dao.YlDao;
import com.bshark.util.Constant;
import com.bshark.util.JsonParser;
import com.google.gson.Gson;

public class YlService {
	
	YlDao ylDao = new YlDao();
	Gson gson = new Gson();

	//获取城市
	public String getCitys(String data){
		return Constant.citys;
	}
	// 获取城市下的影楼
	public String getYinglou(String data){
		String city = JsonParser.get(data,"city");
		List list = ylDao.getYinglou(city);
		return gson.toJson(list);
	}
	// 获取影楼下的场景
	public String getChangjin(String data){
		int ylid =  Integer.valueOf(JsonParser.get(data,"ylid"));
		List list = ylDao.getChangjin(ylid);
		return gson.toJson(list);
	}
	// 获取场景下图片
	public String getPics(String data){
		//???从阿里服务器取？
		int ylid = Integer.valueOf(JsonParser.get(data,"ylid"));
		String urlid = "yl-"+ylid;
		return null;
	}
	
}
